USE [safe_manage]
GO

/****** Object:  Table [dbo].[role_auth]    Script Date: 08/23/2012 14:25:23 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[role_auth](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[AUTH_TYPE] [int] NOT NULL,
	[ROLE_ID] [int] NOT NULL,
	[PROCESS_METHOD] [int] NOT NULL,
	[HAS_RIGHT] [bit] NOT NULL,
 CONSTRAINT [PK_role_auth] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
--缺陷
--作业部确认已整改
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 9, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 6, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 8, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 5, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 4, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 3, 1, 0)
go
--作业部阅知或通知他人处理
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 9, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 6, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 8, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 5, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 4, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 3, 2, 1)
go
--作业部上报智能处室解决
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 9, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 6, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 8, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 5, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 4, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 3, 3, 1)
go
--作业部退回补充
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 9, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 6, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 8, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 5, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 4, 4, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 3, 4, 0)
go
--处室确认已整改
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 12, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 13, 1, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 14, 1,1)
go
--处室阅知或通知他人处理
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 12, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 13, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 14, 2, 1)
go
--处室退回补充
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 12, 4, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 13, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 14, 4, 1)
go
--处室相关单位协助解决
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 12, 5, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 13, 5, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(1, 14, 5, 1)
go

--事苗
--作业部确认已整改
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 9, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 6, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 8, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 5, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 4, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 3, 1, 0)
go
--作业部阅知或通知他人处理
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 9, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 6, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 8, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 5, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 4, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 3, 2, 1)
go
--作业部上报智能处室解决
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 9, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 6, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 8, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 5, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 4, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 3, 3, 1)
go
--作业部退回补充
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 9, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 6, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 8, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 5, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 4, 4, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 3, 4, 0)
go
--处室确认已整改
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 12, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 13, 1, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 14, 1, 1)
go
--处室阅知或通知他人处理
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 12, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 13, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 14, 2, 1)
go
--处室退回补充
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 12, 4, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 13, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 14, 4, 1)
go
--处室相关单位协助解决
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 12, 5, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 13, 5, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(2, 14, 5, 1)
go

--非计划停工

--作业部确认已整改
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 9, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 6, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 8, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 5, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 4, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 3, 1, 0)
go
--作业部阅知或通知他人处理
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 9, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 6, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 8, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 5, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 4, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 3, 2, 1)
go
--作业部上报智能处室解决
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 9, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 6, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 8, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 5, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 4, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 3, 3, 1)
go
--作业部退回补充
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 9, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 6, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 8, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 5, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 4, 4, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 3, 4, 0)
go
--处室确认已整改
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 12, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 13, 1, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 14, 1, 1)
go
--处室阅知或通知他人处理
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 12, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 13, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 14, 2, 1)
go
--处室退回补充
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 12, 4, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 13, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 14, 4, 1)
go
--处室相关单位协助解决
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 12, 5, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 13, 5, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(3, 14, 5, 1)
go

--临时停工
--作业部确认已整改
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 9, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 6, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 8, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 5, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 4, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 3, 1, 0)
go
--作业部阅知或通知他人处理
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 9, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 6, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 8, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 5, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 4, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 3, 2, 1)
go
--作业部上报智能处室解决
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 9, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 6, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 8, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 5, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 4, 3, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 3, 3, 1)
go
--作业部退回补充
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 9, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 6, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 8, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 5, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 4, 4, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 3, 4, 0)
go
--处室确认已整改
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 12, 1, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 13, 1, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 14, 1, 1)
go
--处室阅知或通知他人处理
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 12, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 13, 2, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 14, 2, 1)
go
--处室退回补充
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 12, 4, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 13, 4, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 14, 4, 1)
go
--处室相关单位协助解决
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 12, 5, 0)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 13, 5, 1)
go
insert into role_auth(AUTH_TYPE, ROLE_ID, PROCESS_METHOD, HAS_RIGHT) values(4, 14, 5, 1)
go